package org.example.sensor.repository;

import org.example.sensor.dox.User;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.ListCrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends ListCrudRepository<User, String> {
    User findByAccount(String account);

    @Query("""
select * from user u ;
""")
    List<User> findAllById();
    @Query("""
select * from user u where u.name=:name
""")
    User findByName(String name);
}
